
/////////////////////ANALYSIS///////////////////////////

****EXPERIMENTAL DATA AND ANALYSIS
use "C:\Users\xdudel\Desktop\031613nonverbal_experiment_data_replication.dta"
drop select libstrength age nfc_scale envscale affect qualif elect


***1. MANIPULATION CHECKS page 10:
anova confid_delivery verbal##nonverbal

***2. FILTER VARIABLE (page 11): excluding those who were uncomfortable with the physiological measurements and who did not read the description
	***were you able to read the text and were you comfortable with the physiological devices
	***12 people did not read or where very unconfortable:
tab ctrl_read_text
tab ctrl_physio
tab ctrl_read_text ctrl_physio
gen select =1 if ctrl_read_text >2 & ctrl_physio <4
tab select

***3. RANDOMIZATION CHECKS (page 11):
	***GENDER
anova female verbal##nonverbal if select==1
	***LIBERAL STRENGTH
gen libstrength=1 if partyvoted4==1
recode libstrength .=1 if partyifvoted==1
tab libstrength
recode libstrength .=0
anova libstrength verbal##nonverbal if select==1
	***AGE
gen age= 2011-yearborn
anova age verbal##nonverbal if select==1
	***ENVIRONMENTAL POSITIONS
alpha envir_importance- env2_firms_profit
gen envscale= (24-env2_pesticides_ad -env2_ec_growth -env2_exagerated -env2_firms_profit+ envir_importance +env1_disposable +env1_same_price + env1_higher_price + env1_boycott + env2_unsustainable + env2_imp_issue + env2_intl_agree + env2_protect )/13
sum envscale
anova envscale verbal##nonverbal if select==1
	***PERSONALITY (NEED FOR COGNITION)
alpha  nfc_complex_pbs nfc_gets_job_done nfc_small_pbs nfc_thinking_not_fun nfc_new_sols nfc_deliberating nfc_not_think_hard nfc_no_thought nfc_deliberate_other
sum  nfc_complex_pbs nfc_gets_job_done nfc_small_pbs nfc_thinking_not_fun nfc_new_sols nfc_deliberating nfc_not_think_hard nfc_no_thought nfc_deliberate_other
gen nfc_scale= (5-  nfc_complex_pbs+ nfc_gets_job_done +nfc_small_pbs +nfc_thinking_not_fun + 5-nfc_new_sols +5-nfc_deliberating +nfc_not_think_hard +nfc_no_thought +5-nfc_deliberate_other)/9
anova nfc_scale verbal##nonverbal if select==1

***4. RESULTS (Appendix)

	***Appendix Table 1
sum honest likable warm competent intelligent knowledgeable strong_leader winning_chance persuade_voters if select==1

	***Appendix Table 2
pca honest likable warm competent intelligent knowledgeable  strong_leader winning_chance persuade_voters, comp(3), if select==1
rotate
estat kmo

alpha honest likable warm, gen(affect), if select==1
alpha competent intelligent knowledgeable, gen (qualif), if select==1
alpha strong_leader winning_chance persuade_voters, gen (elect), if select==1

sum affect qualif elect if select==1

	***Appendix Table 3
anova affect nonverbal##verbal if select==1
margins nonverbal##verbal if select==1, post
marginsplot
lincom 1.nonverbal#1.verbal-0.nonverbal#0.verbal
lincom 1.nonverbal#1.verbal-0.nonverbal#1.verbal
lincom 1.nonverbal#1.verbal-1.nonverbal#0.verbal
lincom 1.nonverbal#0.verbal-0.nonverbal#0.verbal
lincom 0.nonverbal#1.verbal-0.nonverbal#0.verbal
lincom 1.nonverbal#0.verbal-0.nonverbal#1.verbal
		***verbal effect
lincom 1.verbal-0.verbal
		***nonverbal effect
lincom 1.nonverbal-0.nonverbal

anova qualif nonverbal##verbal  if select==1
margins nonverbal##verbal  if select==1, post
lincom 1.nonverbal#1.verbal-0.nonverbal#0.verbal
lincom 1.nonverbal#1.verbal-0.nonverbal#1.verbal
lincom 1.nonverbal#1.verbal-1.nonverbal#0.verbal
lincom 1.nonverbal#0.verbal-0.nonverbal#0.verbal
lincom 0.nonverbal#1.verbal-0.nonverbal#0.verbal
lincom 1.nonverbal#0.verbal-0.nonverbal#1.verbal
		***verbal effect
lincom 1.verbal-0.verbal
		***nonverbal effect
lincom 1.nonverbal-0.nonverbal


anova elect nonverbal##verbal  if select==1
margins nonverbal##verbal if select==1, post
lincom 1.nonverbal#1.verbal-0.nonverbal#0.verbal
lincom 1.nonverbal#1.verbal-0.nonverbal#1.verbal
lincom 1.nonverbal#1.verbal-1.nonverbal#0.verbal
lincom 1.nonverbal#0.verbal-0.nonverbal#0.verbal
lincom 0.nonverbal#1.verbal-0.nonverbal#0.verbal
lincom 1.nonverbal#0.verbal-0.nonverbal#1.verbal
		***verbal effect
lincom 1.verbal-0.verbal
		***nonverbal effect
lincom 1.nonverbal-0.nonverbal

***FIGURE 1:
***use the variable condition, coded:
**1=N+V+
**2=N+V-
**3=N-V+
**4=N-V-
tab condition nonverbal
tab condition verbal 
anova affect i.condition if select==1
margins i.condition
marginsplot
anova qualif i.condition if select==1
margins i.condition
marginsplot
anova elect i.condition  if select==1
margins i.condition
marginsplot

//////////////////////EXTERNAL MANIPULATION CHECKS///////////////////////////////

***1. FRAME ANALYSIS (text page 9)
use "C:\Users\xdudel\Desktop\031613videoframe_analysis_replication.dta"
drop faceGCY thumbdist

**DV1: GRAVITY CENTER OF THE CANDIDATE'S FACE AS IT APPEARS ON THE FRAME
	**COMPUTED AS THE DISTANCE FROM THE TOP TO THE GRAVITY CENTER OF THE FACE (ON THE Y AXIS) OVER THE TOTAL HEIGHT OF THE FRAME, LOWER VALUES INDICATE HIGHER POSITIONNING
gen faceGCY= facegcy/ frameheight
anova faceGCY nonverbal##verbal
margins nonverbal#verbal

**DV2: DISTANCE BETWEEN THE CANDIDATES' THUMBS AS IT APPEARS ON THE FRAME
	**COMPUTED AS THE DISTANCE BETWEEN THE LEFT X-COORDINATE OF THE RIGHT THUMB, AND THE RIGHT X-COORDINATE OF THE LEFT THUMB, OVER THE FRAME TOTAL WIDTH
	**POSITIVE VALUES INDICATE OPEN BODY, AND NEGATIVE VALUES INCATE HAND CROSSING. 
gen thumbdist= (rightthumbleft-leftthumbright)/ framewidth
anova thumbdist nonverbal##verbal
margins nonverbal#verbal


***2. INDEPENDENT RATINGS DATA (text page 10)
use "C:\Users\xdudel\Desktop\031613nonverbal_indep_manipcheck_replication.dta"

///VERBAL MANIPULATION CHECK
	***SBS READ ONE OF THE TWO SPEECHES AND RATED THEM ON THE STRENGTH OF ARGUMENTS, STRUCTURE, CLARITY & PERSUASIVENESS
	***HIGHER RATINGS INDICATE BETTER SCORES ON THESE VARIABLES
	***BETWEEN-SBS ANALYSIS 
	***strong_speech= variable identifying the group that saw the high quality message, assignment to this group was random
ttest  strong_args, by(strong_speech)
ttest  structure , by(strong_speech) 
ttest  clear, by(strong_speech) 
ttest  persuasive, by(strong_speech) 

///NONVERBAL MANIPULATION CHECK
	***SBS SAW TWO 30s EXCEPTS FROM DIFFERENT CONDITIONS AND RATED THE LEVEL OF CONFIDENCE IN EACH OF THEM
	***TESTS ARE WITHING-SBS, COMPARING THE CONFIDENCE RATINGS FOR EACH PAIR OF VIDEOS
	***SBS WERE RANDOMLY ASSIGNED TO SEE DIFFERENT PAIRS OF VIDEOS, INDICATED BY THE VARIABLE branch

***WITHIN-SBS TEST OF CONFIDENCE RATINGS FOR THOSE WHO SAW ONLY N- VIDEOS 
	*branch 1 & 2= N-V- vs. N-V+
ttest  confident1= confident2 if branch <3

***WITHIN-SBS TEST OF CONFIDENCE RATINGS FOR THOSE WHO SAW ONLY N+ VIDEOS 
	*branch 11 & 12 = N+V+ vs. N+V-
ttest  confident1= confident2 if branch >10 

***WITHIN-SBS TEST OF CONFIDENCE RATINGS FOR THOSE WHO SAW EXCERPTS FROM N+V+ FIRST, AND N-V- SECOND
*branch 3 & 4 = N+V+ vs. N-V-
ttest  confident1= confident2 if branch >2 & branch<5

***WITHIN-SBS TEST OF CONFIDENCE RATINGS FOR THOSE WHO SAW EXCERPTS FROM N+V+ FIRST, AND N-V+ SECOND
*branch 5 & 6 = N+V+ vs. N-V+
ttest  confident1= confident2 if branch >4 & branch <7

***WITHIN-SBS TEST OF CONFIDENCE RATINGS FOR THOSE WHO SAW EXCERPTS FROM N-V+ FIRST, AND N+V- SECOND
*branch 7 & 8 = N-V+ vs. N+V-
ttest  confident1= confident2 if branch >6 & branch<9

***WITHIN-SBS TEST OF CONFIDENCE RATINGS FOR THOSE WHO SAW EXCERPTS FROM N+V- FIRST, AND N-V-  SECOND
*branch 9 & 10 = N+V- vs. N-V-
ttest  confident1= confident2 if branch >8 & branch<11
